//
//  SSOrderListViewController.swift
//  拾舍清洁
//
//  Created by sky.wei on 2023/6/26.
//

import UIKit



class SSOrderListViewController: UIViewController {

    @IBOutlet weak var pagetitleView: PageTitleView!
    
    
    @IBOutlet weak var pagecontentView: PageContentView!
    
    var vcs = [SSOrderListSubController]()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = "订单"
        
        let vc1 = SSOrderListSubController()
        vc1.type = "0"
        vcs.append(vc1)
        vc1.view.backgroundColor = UIColor.white
        addChild(vc1)
        
        let vc2 = SSOrderListSubController()
        vc2.type = "1"
        vcs.append(vc2)
        vc2.view.backgroundColor = UIColor.white
        addChild(vc2)

        let styleTitle = PageStyle()
        styleTitle.titleViewBackgroundColor = UIColor.clear
        styleTitle.titleFont = UIFont.systemFont(ofSize: 14, weight: .medium)
        styleTitle.titleColor = UIColor.black
        styleTitle.titleSelectedColor = UIColor.themeColor
        styleTitle.coverViewRadius = 0
        styleTitle.coverMargin = 5
        styleTitle.isShowCoverView = false
        styleTitle.isShowBottomLine = true
        styleTitle.bottomLineColor = UIColor.themeColor
        styleTitle.bottomLineHeight = 2
        styleTitle.bottomLineWidth = 0
        let titles = ["全部", "待服务"]// "咨询"
        pagetitleView.initData(style: styleTitle, titles: titles, currentIndex: 0)
        pagecontentView.initData(style: styleTitle, childViewControllers: vcs, currentIndex: 0)
        pagetitleView.delegate = pagecontentView
        pagecontentView.delegate = pagetitleView
        
        
    }
    
    
  

    

}
